{% extends 'layout.html' %}
{% load static %}
{% block data-type %}widgets{% endblock %}
{% block content %}
<div class="tpl-content-wrapper">
    <div class="row-content am-cf">
        <div class="row">
            <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                <div class="widget am-cf">
                    <div class="widget-head am-cf">
                        <div class="widget-title am-fl">新增档案</div>
                        <div class="widget-function am-fr">
                            <a href="javascript:;" class="am-icon-cog"></a>
                        </div>
                    </div>
                    <div class="widget-body am-fr">

                        <form class="am-form tpl-form-border-form tpl-form-border-br" method="POST" action="{% url 'archive:add' %}" enctype="multipart/form-data" accept-charset="UTF-8">
                            {% csrf_token %}
                            <div class="am-form-group">
                                <label for="archivetitle" class="am-u-sm-3 am-form-label">标题 <span class="tpl-form-line-small-title">Title</span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" id="archive-title" name="archivetitle" placeholder="请输入完整的档案标题">
                                    <small>请输入完整的档案标题</small>
                                </div>
                            </div>

                            <input type="hidden" class="tpl-form-input" id="archive-type" name="archivetype" value="{{ type }}">


                            <div class="am-form-group">
                                <label for="archivesubclass" class="am-u-sm-3 am-form-label">子类 <span class="tpl-form-line-small-title">Subclass</span></label>
                                <div class="am-u-sm-9">
                                    <select data-am-selected="{searchBox: 1}" style="display: none;" id="archivesubclass" name="archivesubclass">
                                      <option value="a">-The.CC</option>
                                      <option value="b">夕风色</option>
                                      <option value="o">Orange</option>
                                    </select>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="archivecreatetime" class="am-u-sm-3 am-form-label">发布时间 <span class="tpl-form-line-small-title">Time</span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="am-form-field tpl-form-no-bg" placeholder="发布时间" data-am-datepicker="" readonly="" name="archivecreatetime">
                                    <small>发布时间为必填</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="archivefile" class="am-u-sm-3 am-form-label">附件 <span class="tpl-form-line-small-title">File</span></label>
                                <div class="am-u-sm-9">
                                    <input type="file" class="am-form-field tpl-form-no-bg" id="archive-file" name="archivefile" placeholder="选择附件上传">
                                    <small>选择附件上传</small>
                                </div>
                            </div>



                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3">
                                    <button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}